<?php
declare(strict_types=1);


namespace App\Model\Logic;

use Swoft\Bean\Annotation\Mapping\Bean;
use Swoft\Bean\Annotation\Mapping\Inject;

/**
 * @Bean()
 * Class PostsLogic
 * @package App\Model\Logic
 */
class PostsLogic
{


    /**
     * @Inject()
     * @var PostEsLogic
     */
    private $post_es;

    /**
     * @Inject()
     * @var FormatDataLogic
     */
    private $format_logic;


    public function getLists($type = 'post', $page = 1, $page_size = 10, $member_id = null)
    {
        $following = $block = [];
        $top_id = null;
        $last_id = null;
        $exclude_post_ids = [];
        $list = $this->post_es->postMapping($last_id, $page_size, $following, $block,  $top_id, $exclude_post_ids);
//        return $list['list'];
        $result = $this->format_logic->renderPostList($list['list'], $member_id, '3.6.9', 'ios', 'en');
        return $result;
    }





}